	/**
	* @title 编辑{$table_title}{:PHP_EOL}
	* @description 编辑{$table_title}{:PHP_EOL}
	* @author {$author}{:PHP_EOL}
	* @url /{$module_name}/{$table_name}/edit
	* @method *
	*
	* @header name:token require:1 default: desc:token
	*
	{foreach $table_comment as $key=>$comment }
	* @param name:{$key} type:{$comment['DATA_TYPE']} require:0 other: desc:{$comment['COLUMN_COMMENT']}{:PHP_EOL}
	{/foreach}
	* @return data:{$table_title}@!
	* @data {foreach $table_comment as $key=>$comment }	{$key}:{$comment['COLUMN_COMMENT']}{/foreach}

	*/
	public function edit(){
		$data=input();
		$validate = new \{$app_namespace}\{$module_name}\validate\{:parse_name($table_name,true)}();
		$validate->scene('edit');
		$result = $validate->batch(true)->check($data);
		if ($result !== true) {
			$msg['msg']='校验失败';
			$msg['validate']=$validate->getError();
			$msg['error_id']='1-{$module_no}-{$controller_no}-0001';
			return $this->errorJson($msg);
		}
		$model=new \{$app_namespace}\{$module_name}\model\{:parse_name($table_name,true)}();
		$flag = $model->edit($data);
		if($flag!==false){
			$msg['msg']='修改成功';
			$msg['data']=$model->get($data['id']);
			return $this->successJson($msg);
		}else{
			$msg['msg']='修改失败';
			return $this->errorJson($msg);
		}
	}